// File:    LancamentoFinanceiro.cs
// Author:  Lucas Bittencourt
// Created: quarta-feira, 16 de novembro de 2011 18:32:47
// Purpose: Definition of Class LancamentoFinanceiro

using System;
using System.Text;

namespace DA_OOMModel
{
   public class LancamentoFinanceiro
   {
      private int lncIdLancamento;
      private DateTime lncDtLancamento;
      private DateTime lncDtRegistro;
      private decimal lncVlLancamento;
      private string lncTpLancamento;
      private string lncTpCreditoDebito;
      private Boolean lncChRepassado;

      private ContaBancaria contaBancaria;
      
      /// <summary>
      /// Property for ContaBancaria
      /// </summary>
      /// <pdGenerated>Default opposite class property</pdGenerated>
      public virtual ContaBancaria ContaBancaria
      {
         get
         {
            return contaBancaria;
         }
         set
         {
               this.contaBancaria = value;
         }
      }
      private TituloFinanceiro tituloFinanceiro;
      
      /// <summary>
      /// Property for TituloFinanceiro
      /// </summary>
      /// <pdGenerated>Default opposite class property</pdGenerated>
      public virtual TituloFinanceiro TituloFinanceiro
      {
         get
         {
            return tituloFinanceiro;
         }
         set
         {
               this.tituloFinanceiro = value;
         }
      }
      private MovimentacaoFinanceira movimentacaoFinanceira;
      
      /// <summary>
      /// Property for MovimentacaoFinanceira
      /// </summary>
      /// <pdGenerated>Default opposite class property</pdGenerated>
      public virtual MovimentacaoFinanceira MovimentacaoFinanceira
      {
         get
         {
            return movimentacaoFinanceira;
         }
         set
         {
               this.movimentacaoFinanceira = value;
         }
      }
      private RepasseAoCliente repasseAoCliente;
      
      /// <summary>
      /// Property for RepasseAoCliente
      /// </summary>
      /// <pdGenerated>Default opposite class property</pdGenerated>
      public virtual RepasseAoCliente RepasseAoCliente
      {
         get
         {
            return repasseAoCliente;
         }
         set
         {
               this.repasseAoCliente = value;
         }
      }
   
      /// <summary>
      /// Get value of property LncIdLancamento.
      /// </summary>
      public virtual int LncIdLancamento
      {
         get
         {
            return lncIdLancamento;
         }
         set
         {
            if (this.lncIdLancamento != value)
               this.lncIdLancamento = value;
         }
      }
      
      /// <summary>
      /// Get value of property LncDtLancamento.
      /// </summary>
      public virtual DateTime LncDtLancamento
      {
         get
         {
            return lncDtLancamento;
         }
         set
         {
            if (this.lncDtLancamento != value)
               this.lncDtLancamento = value;
         }
      }
      
      /// <summary>
      /// Get value of property LncDtRegistro.
      /// </summary>
      public virtual DateTime LncDtRegistro
      {
         get
         {
            return lncDtRegistro;
         }
         set
         {
            if (this.lncDtRegistro != value)
               this.lncDtRegistro = value;
         }
      }
      
      /// <summary>
      /// Get value of property LncVlLancamento.
      /// </summary>
      public virtual decimal LncVlLancamento
      {
         get
         {
            return lncVlLancamento;
         }
         set
         {
            if (this.lncVlLancamento != value)
               this.lncVlLancamento = value;
         }
      }
      
      /// <summary>
      /// Get value of property LncTpLancamento.
      /// </summary>
      public virtual string LncTpLancamento
      {
         get
         {
            return lncTpLancamento;
         }
         set
         {
            if (this.lncTpLancamento != value)
               this.lncTpLancamento = value;
         }
      }
      
      /// <summary>
      /// Get value of property LncTpCreditoDebito.
      /// </summary>
      public virtual string LncTpCreditoDebito
      {
         get
         {
            return lncTpCreditoDebito;
         }
         set
         {
            if (this.lncTpCreditoDebito != value)
               this.lncTpCreditoDebito = value;
         }
      }
      
      /// <summary>
      /// Get value of property LncChRepassado.
      /// </summary>
      public virtual Boolean LncChRepassado
      {
         get
         {
            return lncChRepassado;
         }
         set
         {
            if (this.lncChRepassado != value)
               this.lncChRepassado = value;
         }
      }
   
      /// <summary>
      /// Get and set primary key class
      /// </summary>
      public virtual LancamentoFinanceiroPK LancamentoFinanceiroPK
      {
         get 
         {
            return new LancamentoFinanceiroPK(lncIdLancamento);
         }
         set
         {
            if (value != null)
            {
               this.lncIdLancamento = value.LncIdLancamento;
            }
         }
      }
   
      /// <summary>
      /// Get hash code
      /// </summary>
      /// <pdGenerated>Get hash code</pdGenerated>
      public override int GetHashCode()
      {
         int _hashCode = 0;
         _hashCode = 29 * LancamentoFinanceiroPK.GetHashCode();
         _hashCode += 29 * lncDtLancamento.GetHashCode();
      
         _hashCode += 29 * lncDtRegistro.GetHashCode();
      
         _hashCode += 29 * lncVlLancamento.GetHashCode();
      
         if (this.lncTpLancamento != null) 
            _hashCode += 29 * lncTpLancamento.GetHashCode();
      
         if (this.lncTpCreditoDebito != null) 
            _hashCode += 29 * lncTpCreditoDebito.GetHashCode();
      
         _hashCode += 29 * lncChRepassado.GetHashCode();
         return _hashCode;
      }
   
      /// <summary>
      /// Test if two objects are equal
      /// </summary>
      /// <param name="object">Object to compare</param>
      /// <pdGenerated>Test if two objects are equal</pdGenerated>
      public override bool Equals(object obj)
      {
         if (obj == null)
            return false;
         LancamentoFinanceiro cast = obj as LancamentoFinanceiro;
         if (!(obj is LancamentoFinanceiro))
            return false;
         if (!this.LancamentoFinanceiroPK.Equals(cast.LancamentoFinanceiroPK))
            return false;
         if (this.lncIdLancamento != cast.LncIdLancamento)
            return false;
         if (this.lncDtLancamento != cast.LncDtLancamento)
            return false;
         if (this.lncDtRegistro != cast.LncDtRegistro)
            return false;
         if (this.lncVlLancamento != cast.LncVlLancamento)
            return false;
         if (String.Equals(this.lncTpLancamento, cast.LncTpLancamento) == false)
            return false;
      
         if (String.Equals(this.lncTpCreditoDebito, cast.LncTpCreditoDebito) == false)
            return false;
      
         if (this.lncChRepassado != cast.LncChRepassado)
            return false;
      
         return true;
      }
   
      /// <summary>
      /// Get object in string format
      /// </summary>
      /// <pdGenerated>Get object in string format</pdGenerated>
      public override string ToString()
      {
         StringBuilder ret = new StringBuilder();
         ret.Append( "LancamentoFinanceiro: " );
         ret.Append( "LncIdLancamento='" + lncIdLancamento.ToString() + "'");
         ret.Append( "LncDtLancamento='" + lncDtLancamento.ToString() + "'");
         ret.Append( "LncDtRegistro='" + lncDtRegistro.ToString() + "'");
         ret.Append( "LncVlLancamento='" + lncVlLancamento.ToString() + "'");
         if (lncTpLancamento != null)
            ret.Append( "LncTpLancamento='" + lncTpLancamento.ToString() + "'");
         if (lncTpCreditoDebito != null)
            ret.Append( "LncTpCreditoDebito='" + lncTpCreditoDebito.ToString() + "'");
         ret.Append( "LncChRepassado='" + lncChRepassado.ToString() + "'");
         return ret.ToString();
      }
   
   }
}